package com.java.dao.Impl;

import com.java.dao.queryAirLine;
import com.java.entity.AirLine;
import com.java.util.C3P0Util;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;

import java.sql.SQLException;

public class queryAirLineImpl implements queryAirLine {
    QueryRunner qr=new QueryRunner(C3P0Util.getDataSource());
    @Override
    public AirLine queryAirLineByNo(String airlineNo) throws SQLException {
        String sql="select * from f_airLine where airLineNo=?";
         AirLine airLine = qr.query(sql, new BeanHandler<AirLine>(AirLine.class),airlineNo);
        return airLine;
    }
}
